Skip to content

editoast: migrate infra grant revoking to authz::v2#16974

Open
leovalais wants to merge 4 commits into
devfrom
lva/revoke-infra-grant-v2
Open

editoast: migrate infra grant revoking to authz::v2#16974
leovalais wants to merge 4 commits into
devfrom
lva/revoke-infra-grant-v2

Conversation

@leovalais
Copy link
Copy Markdown
Contributor

@leovalais leovalais commented May 29, 2026

@leovalais leovalais requested a review from a team as a code owner May 29, 2026 11:13
@github-actions github-actions Bot added the area:editoast Work on Editoast Service label May 29, 2026
@leovalais leovalais self-assigned this May 29, 2026
@leovalais leovalais moved this to In Progress in Board PI 20 May 29, 2026
@leovalais leovalais moved this from In Progress to Awaiting merge in Board PI 20 May 29, 2026
@leovalais leovalais force-pushed the lva/revoke-infra-grant-v2 branch from 89fecf2 to 12d1fa4 Compare June 3, 2026 20:02
@leovalais
Copy link
Copy Markdown
Contributor Author

rebase + conflicts + use of can_revoke privilege now that it's merged

Copy link
Copy Markdown
Contributor

@Sh099078 Sh099078 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nothing blocking in my comments. We might need to update the garbage collector at some point

Comment thread editoast/authz/src/v2/infra.rs
Comment thread editoast/authz/src/v2.rs Outdated
Comment thread editoast/src/authorizers.rs Outdated
leovalais added 2 commits June 5, 2026 14:41
Signed-off-by: Léo VALAIS <leovalais+git@proton.me>
`Authorizer` is not dyn-compatible for more than one reason. Though it'll
be useful at times to have *either* a `SystemAuthorizer` or
a `UserAuthorizer` depending on the authentication mode.

Signed-off-by: Léo VALAIS <leovalais+git@proton.me>
@leovalais leovalais force-pushed the lva/revoke-infra-grant-v2 branch from 12d1fa4 to 790d964 Compare June 5, 2026 12:47
@leovalais
Copy link
Copy Markdown
Contributor Author

rebase. + conflicts

leovalais added 2 commits June 5, 2026 14:50
Removes the corresponding function in the `Regulator` and adapts all
call sites. Adds the `Protected` operation, its tests, new `Check`s,
their implementation in authorizers and their tests.

CHANGE: now admins **can** revoke the last owner of a resource. It's fine
because admins have access to everything so they can re-assign it if
necessary. It will allow us to "retire" resources without deleting them
for example. It's also much more consistent with our "admin" vison:
"admins can do anything as long as it doesn't break internal consistency".

Improvement: the batching endpoint now revokes all grants concurrently.

Signed-off-by: Léo VALAIS <leovalais+git@proton.me>
Makes sure that our revoking rules below are always upheld:
1. Only owners (and admins) can fully revoke grants
2. The last owner of a resource cannot be revoked (admins can)
3. An owner cannot revoke another owner


Signed-off-by: Léo VALAIS <leovalais+git@proton.me>
@leovalais leovalais force-pushed the lva/revoke-infra-grant-v2 branch from 790d964 to 3f3aea0 Compare June 5, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editoast Work on Editoast Service

Projects

Status: Awaiting merge

Development

Successfully merging this pull request may close these issues.

2 participants